package com.readfeed.app.utils;

public final class Utilities {
	//TODO check what should be in another class
	public static final String TITLE_REGEX = "^([A-Za-z0-9]+ ?)*$";
	public static final int TITLE_MIN_LENGTH = 3;
	public static final int TITLE_MAX_LENGTH = 30;
	
	// dialog tags
	public static final String ERROR_DIALOG_TAG = "error";
	public static final String ADD_CATEGORY_DIALOG_TAG = "add category";
	public static final String PROGRESS_DIALOG_TAG = "progress";
	public static final String NO_ITEMS_SELECTED_MESSAGE = "No items selected";
	
	public static boolean validateTitle(String title){
		if (title.length() < TITLE_MIN_LENGTH || title.length() > 30) {
			return false;
		}
		
		return title.matches(TITLE_REGEX);
	}
}
